#define  _CRT_SECURE_NO_WARNINGS 
#include<stdio.h>
 
int main()
{
	int n = 0;
	
	double sum = 0;
	scanf("%d", &n);
	 
	while(n >= 1)
	{
		double flag = 1;
		if (n % 2 == 0)
		{
			flag = -flag;
		}
			sum += flag/n;
			n--;
	}
	
	printf("%.3f", sum);
	return 0;
}